import request from '@/utils/request'


// 获取旅客列表
export function listCustomers(query) {
  return request({
    url: '/customer/list',
    method: 'get',
    params: query
  })
}

// 新增顾客
export function addCustomer(data) {
  return request({
    url: '/customer/add',
    method: 'post',
    data: data
  })
}


// 新增入住记录
export function addCheckIn(data) {
  return request({
    url: '/checkin/add',
    method: 'post',
    data: data
  })
}

// 获取入住记录列表
export function listCheckIn() {
  return request({
    url: '/checkin/list',
    method: 'get',
  })
}

// 删除旅客信息 单个
export function deleteCustomer(data) {
  return request({
    url: '/customer/delete',
    method: 'put',
    params: data
  });
}

// 删除旅客信息 多个
export function deleteCustomers(data) {
  return request({
    url: '/customer/deletes',
    method: 'put',
    params: data
  });
}

// 修改旅客信息

export function updateCustomer(data) {
  return request({
    url: '/customer/',
    method: 'put',
    data: data
  });
}

// 退房
export function checkout(data) {
  return request({
    url: '/checkin/checkout',
    method: 'put',
    params: data
  });
}

// 入住记录逻辑删除
export function checkInDelete(data) {
  return request({
    url: '/checkin/delete',
    method: 'put',
    params: data
  });
}